package com.dc.di.sf.utils;

import javax.xml.namespace.QName;

import org.apache.axis2.AxisFault;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ConfigurationContextFactory;

public class Axis2Utils {

	private static ConfigurationContext configCtx;

	public static ConfigurationContext getConfigurationContext() {
		if (configCtx == null)
			try {
				configCtx = ConfigurationContextFactory.createConfigurationContextFromFileSystem("axis2",
						"axis2/conf/axis2.xml");
			} catch (AxisFault e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		return configCtx;
	}
	
	public static QName createDIPQName(String localname) {
		return new QName("http://www.digitalchina.com/dip/dataexchange", localname, "dip");
	}
}
